#define TAMANIOCAMPO    			50
#define TAMANIO SECTOR				512
#define _XOPEN_SOURCE 500

#define TRACE                       1
#define CLEAN                       2
#define INFO                       	3

#define TAMACTIVA 					2
#define TAMPASIVA 					2
#define MAX_QUANTITY_SECTORES 		5


#define HSOK	     				101
#define HSFAIL	     				102


#define ERROR						-20
#define EXITO 						0
#define ERRORFORK 					-1
#define ERRORBIND  					-2
#define ERRORAPERTURA 				-3
#define ERRORCOMANDO 				-4
#define ERRORCREARSOCKETUNIX 		-5
#define ERRORCREARSOCKETINET 		-6
#define ERRORCLOSE 					-7
#define ERRORCONECTARUNIX 			-8
#define ERRORCONECTARINET 			-9
#define ERRORACCEPT 				-10
#define ERRORLISTEN 				-11
#define ERRORCONFIG					-12
#define NODATO						-13
#define ERRORCONECTARASERVIDORINET 	-14
#define ERRORCONSOLA 				-15

#define SIZESECTOR 					512



#define READ_SECTOR_REQUEST 			200
#define WRITE_SECTOR_REQUEST 			201
#define RTA_READ_SECTOR_REQUEST 		300
#define RTA_WRITE_SECTOR_REQUEST 		301

#define READ_SECTORSYNC_REQUEST 		400
#define WRITE_SECTORSYNC_REQUEST 		401
#define RTA_READ_SECTORSYNC_REQUEST 	500
#define RTA_WRITE_SECTORSYNC_REQUEST 	501


#define FINPEDIDOS 						2

#define	NUEVO_DA						25
#define	DA_CONECTADO_CORRECTAMENTE		26
#define	DA_INCOMPATIBLE					27

#define INICIAR_SINCRONIZACION          33
#define SYNC           					34
#define NOSYNC          				35

#define NUMEROPEDIDO					70
#define TERMINARCONEXION				71
#define SOCKETRESPUESTA                 72
#define NUMEROSECTOR                    73


#define FAT                             	0
#define ULTIMO_FAT                          1
#define BOOT                            	2
#define RTA_BOOT                           	3
#define HSOK	     			101
#define HSFAIL	     			102



/**************************************************/
#define FAT                             	0
#define ULTIMO_FAT                          1
#define BOOT                            	2
#define RTA_BOOT                           	3
#define READ_SECTOR_REQUEST_LAST 97
#define SET_SECTORES_LAST 96
#define HANDSHAKE 	10
#define		SET_SECTORES		73
#define		RTA_SET_SECTORES	74

#define	 FINSINCRO   107
